using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class Proposal
{
readonly static Action<Proposal,object>[] _SetValues=new Action<Proposal,object>[]{(r,t)=>r.CreationDate=Reflection.ParseObject(t, r.CreationDate),(r,t)=>r.Poster=Reflection.ParseObject(t, r.Poster),(r,t)=>r.ref_id=Reflection.ParseObject(t, r.ref_id),(r,t)=>r.Type=Reflection.ParseObject(t, r.Type),(r,t)=>r.user_id=Reflection.ParseObject(t, r.user_id)};
readonly static string[] _Columns=new string[]{"CreationDate","Poster","ref_id","Type","user_id"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"CreationDate", this.CreationDate);
AppendValue(action,"Poster", this.Poster);
AppendValue(action,"ref_id", this.ref_id);
AppendValue(action,"Type", this.Type);
AppendValue(action,"user_id", this.user_id);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[5];
cols[0]= RecordColumn.Column("CreationDate",this.CreationDate);
cols[1]= RecordColumn.Column("Poster",this.Poster);
cols[2]= RecordColumn.Column("ref_id",this.ref_id);
cols[3]= RecordColumn.Column("Type",this.Type);
cols[4]= RecordColumn.Column("user_id",this.user_id);
return cols;
}

}
}

